import React from "react";
import "./index.scss";
export default function SpNavCom({ data, handlerClick, className = "nav-box", classNameChildren = "item-box" }) {
  return (
    <div className={className}>
      {data?.length &&
        data.map((item) => {
          return (
            <div
              key={item.path}
              onClick={() => {
                handlerClick(item.path);
              }}
              className={classNameChildren}
            >
              {item.title}
            </div>
          );
        })}
    </div>
  );
}
